package org.example.SSM.Service;

import org.example.SSM.User;
import org.example.SSM.usMapper.userMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class userServicelmpl implements userService{

    private userMapper mapper;
    @Override
    public User findUserId(int id) {
        return mapper.findUserId(id);
    }

    @Override
    public boolean insertUser(User user) {
        if(mapper.insertUser(user)){
            System.out.println("数据插入成功！");
            return true;
        }else{
            System.out.println("数据插入失败！");
            return false;
        }
    }
}
